/**
 * Copyright 2018 人人开源 http://www.renren.io
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package io.renren.modules.sys.service;


import com.baomidou.mybatisplus.service.IService;
import io.renren.common.utils.R;
import io.renren.modules.sys.entity.SmsEntity;
import io.renren.modules.sys.entity.UserEntity;
import io.renren.modules.sys.form.LoginForm;

import java.util.List;
import java.util.Map;

/**
 * 用户
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2017-03-23 15:22:06
 */
public interface UserService extends IService<UserEntity> {

	UserEntity queryByMobile(String mobile);

	/**
	 * 用户登录
	 * @param form    登录表单
	 * @return        返回登录信息
	 */
	public R login(LoginForm form);

	UserEntity QQlogin(String QQUid);

	void sendSms(String mobile);

	SmsEntity getSmsEntityByCode(SmsEntity smsEntity);

	UserEntity queryByQQuid(String qqUid);

	void deleteByQQuid(String qqUid);

	UserEntity queryByOpenId(String openId);

	void deleteByOpenId(String qqUid);

	void upadateUserNameByUserId(UserEntity u);

	void upadateSexByUserId(UserEntity u);

	void upadateAgeByUserId(UserEntity u);

	void upadateAddressByUserId(UserEntity u);

	String selectPasswordByUserId(Long userId);

	void upadatePasswordOnLogin(UserEntity u);

	String selectMobileByUserId(Long userId);

	String getCodeByMobile(String newMobile);

	void updateMobileByUserId(UserEntity user);

	Long getUserIdByMobile(String mobile);

	void updateHeadImageByUserId(UserEntity user);

	String getMobileByUserId(Long userId);

	UserEntity getUserByUserId(Long id);

	String getTokenByUserId(Long userId);

	List<UserEntity> selectUserByMobile(String newMobile);

	UserEntity getNewUser();

	void updateOpenIdByuserId(UserEntity userEntity);

	UserEntity getUserByOpenId(UserEntity userEntity);

	void updateUserByMobile(UserEntity userEntity);

	void updateImaAndNickByMobile(UserEntity userEntity);

	UserEntity getUserByToken(String token);

	void updateIsBangDingQQOrWeChat(UserEntity userEntity);

    List<Long> getSameSchoolUserIds(Integer schoolId);

    void updateNickNameB(UserEntity userEntity);

	Byte[] getNickNameById(Long userId);

	void updateNickNameById(UserEntity userEntity);

	int getSchoolIdByUserId(Map map);

	List getForYoungById(Long id);

	List getUserIdBySchoolId(int schoolId);

	void updateIsOneLogin(Map m);

	List getWork();

	void updateUserWork(Map map);

	List getLable();
}
